/* ======================================= */
/* HEADER STYLING - GEREFACTORED           */
/* ======================================= */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  background: var(--secondary-bg);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  gap: 12px;
}

/* ======================================= */
/* MOBILE SIDEBAR TOGGLE                   */
/* ======================================= */
.mobile-sidebar-toggle {
  display: none; /* Standaard verborgen (desktop) */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.mobile-sidebar-toggle .line {
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-sidebar-toggle:hover .line {
  background: var(--link-color);
}

/* Animatie wanneer sidebar open is */
.mobile-sidebar-toggle.active .line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-sidebar-toggle.active .line:nth-child(2) {
  opacity: 0;
}

.mobile-sidebar-toggle.active .line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ======================================= */
/* LOGO                                    */
/* ======================================= */
.logo.logo-animated {
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  gap: 0;
  flex-shrink: 0;
  flex: 0.0 auto;
  justify-content: center;
  margin: 0;
}

.logo.logo-animated .letter {
  display: inline-block;
  animation: float-header 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

#logoNormalHeader { color: var(--text-primary); }
#logoAccentHeader { color: var(--accent-purple); }

.logo.logo-animated .letter:hover {
  transform: scale(1.2) translateY(-3px) !important;
  color: var(--link-color);
}

.logo.logo-animated .accent .letter {
  animation: glow-header 2s ease-in-out infinite;
}

@keyframes float-header {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes glow-header {
  0%, 100% { 
    text-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
    transform: scale(1);
  }
  50% { 
    text-shadow: 0 0 20px rgba(147, 51, 234, 0.8), 0 0 30px rgba(147, 51, 234, 0.4);
    transform: scale(1.05);
  }
}

/* ======================================= */
/* HEADER ACTIONS (rechts)                 */
/* ======================================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

/* Taalwisseling */
.language-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-links a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.language-links a:hover {
  color: var(--link-color);
  border-color: var(--border-color);
  background: var(--card-bg);
}

.language-links a.active {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
  background: rgba(147, 51, 234, 0.1);
}

.header-coffee-link {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.header-coffee-link:hover {
  transform: scale(1.05);
}

.header-coffee-logo {
  height: 35px;
  width: auto;
  border-radius: 5px;
}

/* ======================================= */
/* THEME TOGGLE                            */
/* ======================================= */
.theme-toggle {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--card-bg);
  border-color: var(--link-color);
  transform: scale(1.05);
}

.theme-icon {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

/* ======================================= */
/* RESPONSIVE - MOBIEL                     */
/* ======================================= */
@media (max-width: 768px) {
  header {
    padding: 0 10px;
    gap: 8px;
    height: 56px;
    justify-content: flex-start;
  }

  body {
    padding-top: 56px;
  }

  .mobile-sidebar-toggle {
    display: flex;
    width: 26px;
    height: 20px;
    flex-shrink: 0;
    order: 1;
  }

  .logo.logo-animated {
    order: 2;
    font-size: 1rem;

    position: static;
    left: auto;
    transform: none;

    flex: 0 0 auto;
    margin: 0;
    justify-content: flex-start;
  }

  .header-actions {
    order: 3;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
  }

  .language-links {
    display: none;
  }

  .header-coffee-logo {
    height: 24px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .theme-icon {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0 8px;
    gap: 6px;
    height: 54px;
    justify-content: flex-start;
  }

  /* Body padding voor fixed header op kleine mobiel */
  body {
    padding-top: 54px;
  }

  .mobile-sidebar-toggle {
    width: 24px;
    height: 18px;
    order: 1;
  }

  .logo.logo-animated {
    order: 2;
    font-size: 0.95rem;

    position: static;
    left: auto;
    transform: none;

    flex: 0 0 auto;
    margin: 0;
    justify-content: flex-start;
  }

  .header-actions {
    order: 3;
    gap: 4px;
    margin-left: auto;
  }

  .header-coffee-logo {
    height: 22px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }

  .theme-icon {
    font-size: 0.95rem;
  }
}

@media (max-width: 380px) {
  header {
    padding: 0 6px;
    height: 52px;
    justify-content: flex-start;
  }

  /* Body padding voor fixed header op extra kleine mobiel */
  body {
    padding-top: 52px;
  }

  .mobile-sidebar-toggle {
    order: 1;
  }

  .logo.logo-animated {
    order: 2;
    font-size: 0.9rem;

    position: static;
    left: auto;
    transform: none;

    flex: 0 0 auto;
    margin: 0;
    justify-content: flex-start;
  }

  .header-actions {
    order: 3;
    margin-left: auto;
  }

  .header-coffee-logo {
    height: 20px;
  }

  .theme-toggle {
    width: 30px;
    height: 30px;
  }

  .theme-icon {
    font-size: 0.9rem;
  }
}